package com.gouldzd.dao;

import com.gouldzd.pojo.OrderSetting;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/*
 * @Author zhangdan
 * @Description //TODO 预约设置持久层DAO接口
 * @Date 22:26 2020/5/1
 * @Param
 * @return
 **/
public interface OrderSettingDao {

    //添加预约日期设置
    public void add(OrderSetting orderSetting);

    //批量添加预约日期设置
    public void batchAdd(@Param("orderSettings") List<OrderSetting> orderSettings);

    //在批量导入的预约日期数据中获取所有已经设置预约日期
    List<OrderSetting> findByOrderDateInData(@Param("data") List<OrderSetting> data);

    //更新预约日期设置
    public void editNumberByOrderDate(OrderSetting orderSetting);

    //根据日期查询是否已经进行预约设置
    public long findCountByOrderDate(Date orderDate);

    //根据日期范围查询
    public List<OrderSetting> getOrderSettingByMonth(Map<String, String> map);

    //根据日期范围查询
    List<OrderSetting> getOrderSettingByDate(String date);

    //根据日期查询是否已经进行预约设置,(查询用户所选择的预约日期是否已经提前进行了预约设置)
    public OrderSetting findByOrderDate(Date orderDate);

    //更新已预约人数
    public void editReservationsByOrderDate(OrderSetting orderSetting);

}
